package com.xuan.bigdog.lib.chat.adapter;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.xuan.bigdog.lib.widgets.adapter.DGBaseAdapter;

/**
 * 聊天工具适配器
 * 
 * @author xuan
 */
public class DGChatImageAdapter extends DGBaseAdapter {
	private final Context context;
	private final List<Integer> dataList;

	public DGChatImageAdapter(Context context, List<Integer> dataList) {
		this.context = context;
		this.dataList = dataList;
	}

	@Override
	public int getCount() {
		return dataList.size();
	}

	@Override
	public View getView(int position, View view, ViewGroup viewGroup) {
		ImageView imageView = new ImageView(context);
		imageView.setImageResource(dataList.get(position));
		return imageView;
	}

}
